package com.gruppe1.inu;

import com.gruppe1.inu.R;
import com.gruppe1.inu.Notififations.DelayedActivity;
import com.gruppe1.inu.Notififations.MiscActivity;
import com.gruppe1.inu.Notififations.SickActivity;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TabHost;

public class NotificationActivity extends  TabActivity {

	
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.notif_tab);

	
	    TabHost tabHost = getTabHost();  // The activity TabHost
	    TabHost.TabSpec spec;  // Reusable TabSpec for each tab
	    Intent intent;  // Reusable Intent for each tab

	    // Create an Intent to launch an Activity for the tab (to be reused)
	    intent = new Intent().setClass(this, SickActivity.class);

	    // Initialize a TabSpec for each tab and add it to the TabHost
	    spec = tabHost.newTabSpec("Sygdom").setIndicator("Sygdom")                   
	                  .setContent(intent);
	    tabHost.addTab(spec);

	    // Do the same for the other tabs
	    intent = new Intent().setClass(this, DelayedActivity.class);
	    spec = tabHost.newTabSpec("Forsinket").setIndicator("Forsinket")
	                  .setContent(intent);
	    tabHost.addTab(spec);

	    intent = new Intent().setClass(this, MiscActivity.class);
	    spec = tabHost.newTabSpec("Diverse").setIndicator("Diverse")
	                  .setContent(intent);
	    tabHost.addTab(spec);
	    

	    tabHost.setCurrentTab(0);
	    
	    ImageButton mBackButton = (ImageButton) findViewById(R.id.backBtn);
		mBackButton.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				finish();
				
			}
		});
	}
	
}
